package com.atguigu.product.feign;

import com.atguigu.spzx.model.pojo.product.ProductSku;
import com.atguigu.spzx.model.vo.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

@FeignClient("service-product")
public interface ProductFeignClient {
    @GetMapping("/api/product/getBySkuId/{skuId}")
    public Result<ProductSku> getBySkuId(@PathVariable("skuId") Long skuId);

    @PutMapping("/api/product/auth/updateStormAndSale/{skuId}/{skuNum}")
    void updateStormAndSale(@PathVariable Long skuId, @PathVariable Integer skuNum);
}
